﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ZL.WeChatCard.Entity;
using ZL.WeChatCard.Entity.EasyUse;
using ZL.WeChatCard.Service.Base;
using ZL.WeChatCard.Service.InterFace;

namespace ZL.WeChatCard.Service.EasyUse
{
    public class ProfileService : ServiceBase, IProfileService
    {
        public ProfileAccinfo GetProfileAccinfoResponse(string openid)
        {
            string openID = openid;
            var url = $"{server}/Api/EasyUse/GetProfileAccinfo?openid={openID}";
            var ProfileAccinfo = httpClient.HttpGet<ProfileAccinfoResponse>(url, Identity);
            return ProfileAccinfo.profileaccInfo;
        }

        public ProfileAccinfoResponse UpdateProfileAccInfo(ProfileAccinfo dm)
        {
            var url = $"{server}/Api/EasyUse/UpdateProfile";
            var ProfileAccinfo = httpClient.HttpPost<ProfileAccinfo, ProfileAccinfoResponse>(dm,url, Identity);
            return ProfileAccinfo;
        }
    }
}
